﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace PictureManager.Controllers
{
    public class ManagerController : Controller
    {
        Models.PictrueManagerEntities context = new Models.PictrueManagerEntities();

        public ActionResult Index()
        {
            return View();
        }

        [Authorize(Roles = "注册用户,下载用户,图片管理员,超级管理员")]
        public ActionResult MyPictures()
        {
            //List<Models.图片组> lst图片组 = context.图片组.Where(c => c.上传用户ID == "").ToList();
            //List<Models.用户> lst用户 = context.用户.ToList();
            return View();
        }

        public ActionResult GetList()
        {
            //List<Models.图片组> lst图片组 = context.图片组.ToList();
            List<Models.用户> lst图片组 = context.用户.ToList();
            return Json(lst图片组, JsonRequestBehavior.AllowGet);
        }

        public string AAA(string aaa)
        {
            return aaa;
        }
    }
}
